package com.peas.platform.module.icims.contract.initial.adapter.repository.po;

import java.util.*;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 初始合同执行-借阅
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_contract_initial_borrow`")
public class ContractInitialBorrowPo extends BasePo {

    // 合同ID
    // 【初始合同表】
    @Comment(value = "合同ID")
    @NotNull(message = "合同ID不能为空")
    @TableField(value = "`contract_initial_id`", jdbcType = JdbcType.BIGINT)
    private Long contractInitialId;

    // 批次号
    @Comment(value = "批次号")
    @Size(max = 20, message = "批次号不能超过20个字符")
    @TableField(value = "`batch`", jdbcType = JdbcType.VARCHAR)
    private String batch;

    // 借阅人
    // 【用户表】
    @Comment(value = "借阅人")
    @TableField(value = "`borrow_user_id`", jdbcType = JdbcType.BIGINT)
    private Long borrowUserId;

    // 借阅人部门
    // 【组织架构表】
    @Comment(value = "借阅人部门")
    @TableField(value = "`borrow_department_id`", jdbcType = JdbcType.BIGINT)
    private Long borrowDepartmentId;

    // 借阅类型
    // 纸质、电子
    // 字典取值:ContractInitialBorrowType
    @Comment(value = "借阅类型", dictType = "ContractInitialBorrowType")
    @Size(max = 20, message = "借阅类型不能超过20个字符")
    @TableField(value = "`borrow_type`", jdbcType = JdbcType.VARCHAR)
    private String borrowType;

    // 借阅状态
    // 枚举取值:ContractInitialBorrowState
    @Comment(value = "借阅状态", enumType = "ContractInitialBorrowState")
    @Size(max = 20, message = "借阅状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 借阅凭据
    @Comment(value = "借阅凭据")
    @Size(max = 100, message = "借阅凭据不能超过100个字符")
    @TableField(value = "`borrow_token`", jdbcType = JdbcType.VARCHAR)
    private String borrowToken;

    // 借阅签字附件
    // 【附件表】
    @Comment(value = "借阅签字附件")
    @TableField(value = "`borrow_attachment_id`", jdbcType = JdbcType.BIGINT)
    private Long borrowAttachmentId;

    // 电子档下载次数
    @Comment(value = "电子档下载次数")
    @TableField(value = "`download_times`", jdbcType = JdbcType.BIGINT)
    private Long downloadTimes;

    // 归还时间
    @Comment(value = "归还时间")
    @TableField(value = "`return_time`", jdbcType = JdbcType.TIMESTAMP)
    private Date returnTime;

    // 备注
    @Comment(value = "备注")
    @Size(max = 1000, message = "备注不能超过1000个字符")
    @TableField(value = "`remark`", jdbcType = JdbcType.VARCHAR)
    private String remark;

}
